<template>
  <div class="main">
    <div v-if="status">
        <h3>{{data.type.text}}</h3>
        <div v-html="data.content"></div>
    </div>
    <div v-else>
        <h3>暂无内容</h3>
    </div>
  </div>
</template>

<script>
import {edit,search} from '@/api/news'
import { getToken } from '@/utils/auth'
export default {
 data(){
     return {
         loading:false,
         status:true,
         data:{},
         params:{
             managerId:localStorage.getItem('id'),
             token:getToken(),
             type:'intro'
         }
     }
 },
methods:{
    found(){
         search(this.params).then((json) => {
            if(json.status === 200){
              if(json.data){
                  this.data=json.data
              }else{
                  this.status=false;
              }
              }else{
                this.$message.error(json.data.message);
              }
          })
    }
},
 created(){
     this.found()
 }
}
</script>

<style lang="scss" scoped>
    .main{
        width:70%;
    }
</style>
